#ifndef _IOT_MSG_H_
#define _IOT_MSG_H_

typedef enum{
	IOT_MSG_ID_TIMER_EXPIRY = 7147,
	IOT_MSG_ID_UART_READY_TO_READ = 22471,
	IOT_MSG_ID_START = 24846,

	IOT_MSG_ID_GSM_INIT,
	IOT_MSG_ID_URC_EIND_128,
	IOT_MSG_ID_URC_EIND_1,
	IOT_MSG_ID_FIRST_AT,	
	IOT_MSG_ID_AT_SEND,
	IOT_MSG_ID_AT_RETURN,
	IOT_MSG_ID_RELINK,
	IOT_MSG_ID_UNLINK,
	IOT_MSG_ID_GPS_MD_OPEN,
	IOT_MSG_ID_GPS_MD_CLOSE,
	IOT_MSG_ID_SMS_READ,

    IOT_MSG_ID_SERVER_TCP_RECV,

    IOT_MSG_ID_SEND_T2,
    IOT_MSG_ID_SEND_T3,
    IOT_MSG_ID_SEND_T4,
    IOT_MSG_ID_SEND_T5,
    IOT_MSG_ID_SEND_T7,
    IOT_MSG_ID_SEND_T11,
    IOT_MSG_ID_SEND_T12,
    IOT_MSG_ID_SEND_T13,
    IOT_MSG_ID_SEND_T14,
    IOT_MSG_ID_SEND_T60,
    IOT_MSG_ID_SEND_T100,
    IOT_MSG_ID_SEND_T101,
    IOT_MSG_ID_SEND_T102,
    IOT_MSG_ID_SEND_T103,
    IOT_MSG_ID_SEND_T104,
    IOT_MSG_ID_SEND_T105,
    IOT_MSG_ID_SEND_T106,
    IOT_MSG_ID_SEND_T107,
    IOT_MSG_ID_SEND_T202,
    IOT_MSG_ID_SEND_T20A,
    IOT_MSG_ID_SEND_T20B,
    IOT_MSG_ID_SEND_T300,
    IOT_MSG_ID_SEND_T301,
    IOT_MSG_ID_SEND_T302,
    IOT_MSG_ID_SEND_T303,
    IOT_MSG_ID_SEND_T401,

    IOT_MSG_ID_SERVER_LINK_START,
    IOT_MSG_ID_SERVER_LINK_STOP,

	IOT_MSG_ID_CAN_ON,
	IOT_MSG_ID_CAN_OFF,

	IOT_MSG_ID_K_ON,
	IOT_MSG_ID_K_OFF,
	
	//add user msg id in there
	IOTMSG_ID_TEST,
	IOT_MSG_ID_END=IOT_MSG_ID_START+100
}iot_E_MsgId;

typedef struct{
	iot_E_MsgId msg_id;
	void * data_ptr;
	iot_uint16_t data_len;
	iot_uint16_t extra_info;
}iot_S_Msg;

extern iot_bool_t iot_msgSend(iot_uint16_t src_mod_id, iot_uint16_t des_mod_id, iot_E_MsgId msg_id, void *data,iot_uint16_t data_len);
extern iot_bool_t iot_msgReceive(iot_S_Msg *msg);
extern void iot_msgDestroy(iot_S_Msg *msg);

#endif
